package com.star.uc.infras.repository.model;

import com.star.common.core.contract.BaseRepository;
import com.star.common.core.contract.Model;
import com.star.uc.infras.repository.service.UserInfoRepository;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDateTime;

/**
 * 用户信息表(UserInfo)表实体类
 *
 * @author 周恒哲
 * @since 2023-10-18 14:21:51
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
public class UserInfoBO extends Model {
    /**
     * 主键ID（雪花算法）
     */
    @Schema(description = "主键ID")
    private String id;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 创建人编码
     */
    @Schema(description = "创建人编码")
    private String createBy;

    /**
     * 创建人编码
     */
    @Schema(description = "创建人")
    private String creator;

    /**
     * 创建人编码
     */
    @Schema(description = "更新人编码")
    private String updateBy;

    /**
     * 创建人编码
     */
    @Schema(description = "更新人")
    private String updater;
    /**
     * 租户ID
     */
    @Schema(description = "租户ID")
    private String tenantId;
    /**
     * 用户ID
     * @BizKey 业务主键
     */
    @Schema(description = "用户ID")
    private String uid;
    /**
     * 昵称
     */
    @Schema(description = "昵称")
    private String nickName;
    /**
     * 真实姓名
     */
    @Schema(description = "真实姓名")
    private String realName;
    /**
     * 区域码
     */
    @Schema(description = "区域码")
    private String areaCode;
    /**
     * 状态
     *
     * @see com.star.uc.contract.enums.UserStatusEnum
     */
    @Schema(description = "状态")
    private Integer status;

    /**
     * 头像
     */
    @Schema(description = "头像")
    private String avatar;

    public static UserInfoRepository repository() {
        return BaseRepository.of(UserInfoBO.class);
    }

}

